<template>
    <view class="indexBig" :class="{ hidden: hiddenFlag }">
        <p class="change" v-if="froms == 'company'" @click="goToPage('company')">返回企业端</p>
        <view @click="clearCompany" v-if="isSpecial"
            style="padding: 0rpx 40rpx; border-radius: 20rpx; font-size: 32rpx; line-height: 2; margin-left: 10rpx; margin-top: 20rpx; color: #fff">
            . </view>
        <view class="top" v-if="isSpecial" style="height: 60rpx"></view>
        <!-- 定位栏 -->
        <view class="top" v-if="!isSpecial">
            <view>
                <u-icon name="map" size="36" @click="showPosi"></u-icon>
                <view @click="showPosi">
                    {{ myAddress ? myAddress.addressName : '' }}
                    <u-icon name="arrow-down" size="36"></u-icon>
                </view>
                <u-icon name="reload" size="36" @click="refreshPosi"></u-icon>
            </view>
        </view>

        <!-- 搜索栏 -->
        <view class="searchBox">
            <u-icon name="search" size="42" color="#ccc"></u-icon>
            <u-input type="text" :clearable="false" v-model="storeName" placeholder="搜索你想要的内容" confirm-type="search"
                @confirm="getStoreList(false, false)"></u-input>
            <view class="" @click="getStoreList(false, false)">搜索</view>
        </view>

        <!-- 商家内容 -->
        <view class="content">
            <!-- 品类列表 -->
            <view class="topMenuBig">
                <view class="topMenuBox">
                    <!-- <view class="topMenu" :style="{width:topMenuWidth+'px'}"> -->
                    <view class="list" ref="list" v-for="(item, index) in mainCategorieList" :key="index"
                        @click="changeState(index)">
                        <view class="imageContent">
                            <image :src="item.icon | getImg" mode="aspectFill"></image>
                        </view>
                        <view class="">{{ item.name }}</view>
                    </view>
                    <!-- </view> -->
                </view>
            </view>
            <!-- 当前站点下单人数 -->
            <view class="swiperContent">
                <swiper style="height: 200px" :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
                    <swiper-item>
                        <view class="countDown">
                            <view class="countTop">
                                <view class="">
                                    目前下单人已有
                                    <!-- <text>{{ orderList.length }}</text> -->
                                    <text>{{ orderList && orderList.length != 0 ? orderList[0].pickingSerialNo : 0
                                        }}</text>
                                    位用户下单
                                </view>
                                <view class="" @click="showOrderList">查看详情 ></view>
                            </view>
                            <view class="countCount">
                                <view class="">距结束</view>
                                <view class="">
                                    <view class="">
                                        <Flipper :total="2" :current="countInfo.systemHour1"></Flipper>
                                        <Flipper :total="9" :current="countInfo.systemHour2"></Flipper>
                                    </view>
                                    <view class="point">:</view>
                                    <view class="">
                                        <Flipper :total="5" :current="countInfo.systemMinute1"></Flipper>
                                        <Flipper :total="9" :current="countInfo.systemMinute2"></Flipper>
                                    </view>
                                    <view class="point">:</view>
                                    <view class="">
                                        <Flipper :total="5" :current="countInfo.systemSecound1"></Flipper>
                                        <Flipper :total="9" :current="countInfo.systemSecound2"></Flipper>
                                    </view>
                                </view>
                            </view>
                        </view>
                    </swiper-item>
                </swiper>
            </view>
            <!-- 商户列表 -->
            <view class="hotelBox" v-if="shopList.length != 0">
                <view class="hotellList" v-for="(item, index) in shopList" :key="index">
                    <view class="hotelInfo" @click="showStoreDet(item)">
                        <image :src="item.logo | getImg" mode="aspectFill"></image>
                        <view class="topRight">
                            <view class="">
                                <view class="">{{ item.storeName }}</view>
                                <template v-if="myAddress.isShowLimitedTimeOfferOpenSite == 1">
                                    <view class="notEnd" v-if="item.businessState == '营业'">
                                        <!-- 营业时间 -->
                                        <view class="">限时优惠</view>
                                        <view class="">
                                            {{ countInfo[`hour${index}`] }}:{{ countInfo[`minute${index}`] }}:{{
                                                countInfo[`secound${index}`]
                                            }}
                                        </view>
                                    </view>
                                </template>
                                <template v-else>
                                    <view class="notEnd" v-if="item.businessState == '营业'">
                                        <!-- 营业时间 -->
                                        <view class="">距结束</view>
                                        <view class="">
                                            {{ countInfo[`hour${index}`] }}:{{ countInfo[`minute${index}`] }}:{{
                                                countInfo[`secound${index}`]
                                            }}
                                        </view>
                                    </view>
                                    <view class="end" v-else>
                                        营业时间
                                        <text>歇业中</text>
                                    </view>
                                </template>

                            </view>
                            <view class="">
                                <!-- <view class="">人均价格 <text>￥{{item.perCapita}}</text></view> -->
                                <!-- <view class="">人均价格 <text>￥10</text></view> -->
                                <view class="">
                                    口味
                                    <text>{{ item.flavorScore }}分</text>
                                </view>
                                <view class="">
                                    包装
                                    <text>{{ item.packagingScore }}分</text>
                                </view>
                                <view class="">
                                    份量
                                    <text>{{ item.componentScore }}分</text>
                                </view>
                            </view>
                            <view class="">
                                <!-- <view class="">营业时间<text>{{item.businessHoursBegin}}～{{item.businessHoursEnd}}</text> -->
                                <view class="">
                                    营业时间
                                    <text>{{ item.businessTime }}</text>
                                </view>
                                <!-- <view class="">歇业时间<text>{{item.businessHoursEnd}}～{{item.businessHoursBegin}}</text></view> -->
                            </view>
                            <view class="">{{ item.storeDescription }}</view>
                        </view>
                        <!-- <view class="fixBox" v-if="item.businessState!='营业'">该商家已打烊</view> -->
                    </view>
                    <view class="shopContent">
                        <view class="shopList" v-for="(foodItem, foodIndex) in item.hcCommodityList" :key="foodIndex">
                            <view class="imgContent">
                                <u-lazy-load :image="foodItem.productPicture | getImg" :loading-img="loadingImg"
                                    img-mode=""></u-lazy-load>
                                <view class="must" v-if="foodItem.requiredFlag == '是'">必选</view>
                            </view>
                            <view class="shopInfo">
                                <view class="shopName">{{ foodItem.tradeName }}</view>
                                <view class="shopDescribe">{{ foodItem.productDescription }}</view>
                                <view class="control">
                                    <!-- 非限购 -->
                                    <view class="normal" v-if="foodItem.limitBuy <= -1">
                                        <template v-if="myAddress.isShowLimitedTimeOfferOpenSite">
                                            <text class="price discount">
                                                <text>￥</text>
                                                {{ foodItem.commodityPriceCache - myAddress.limitedTimeOfferMoneySite }}
                                            </text>
                                            <span class="discount">原价:￥{{ foodItem.commodityPriceCache }}</span>
                                        </template>
                                        <template v-else>
                                            <view class="price">
                                                <text>￥</text>
                                                {{ foodItem.commodityPriceCache }}
                                            </view>
                                        </template>
                                    </view>
                                    <!-- 限购 -->
                                    <view class="surplus" v-else>
                                        <view>
                                            <text class="price">
                                                <text>￥</text>
                                                {{ foodItem.commodityPriceCache }}
                                            </text>
                                        </view>
                                        <view>剩余{{ foodItem.remainingQuantity }}</view>
                                    </view>
                                    <!-- 显示规格按钮 -->
                                    <view class="specConetnt" v-if="foodItem.hasSpec">
                                        <view class="selSpec" @click="showSpecAlert(index, foodIndex)">
                                            <view class="">选规格</view>
                                        </view>
                                        <view class="num" v-if="foodItem.num > 0">{{ foodItem.num }}</view>
                                    </view>
                                    <!-- 数量输入 -->
                                    <view class="showInput" v-else>
                                        <svg @click="changeShopNum('down', index, foodIndex, foodItem, item)"
                                            t="1672841614542" class="icon" viewBox="0 0 1024 1024" version="1.1"
                                            xmlns="http://www.w3.org/2000/svg" p-id="5146" width="18" height="18">
                                            <path d="M170.666667 469.333333h682.666666v85.333334H170.666667z"
                                                fill="#444444" p-id="5147">
                                            </path>
                                        </svg>
                                        <u-input v-model="foodItem.num" :clearable="false" :disabled="true" />
                                        <svg @click="changeShopNum('add', index, foodIndex, foodItem, item)"
                                            t="1672841289544" class="icon" viewBox="0 0 1024 1024" version="1.1"
                                            xmlns="http://www.w3.org/2000/svg" p-id="3814" width="15" height="15">
                                            <path
                                                d="M939.939489 459.072557 562.339502 459.072557 562.339502 83.519182 462.055494 83.519182 462.055494 459.072557 84.455507 459.072557 84.455507 559.356564 462.055494 559.356564 462.055494 939.003164 562.339502 939.003164 562.339502 559.356564 939.939489 559.356564Z"
                                                fill="#272636" p-id="3815"></path>
                                        </svg>
                                    </view>
                                </view>
                            </view>
                            <!-- </block> -->
                        </view>
                    </view>
                    <view class="more" v-if="item.hcCommodityList.length == 6 && !item.maxShow"
                        @click="changeMaxShow(index)">
                        <text>查看更多</text>
                        <u-icon name="arrow-down" size="36"></u-icon>
                    </view>
                </view>
            </view>
            <u-empty text="没有找到相关数据" mode="page" v-if="shopList.length == 0"></u-empty>
        </view>
        <!-- 购物车底部 -->
        <view class="shopCarBottom">
            <view class="">
                <view class="" @click="changeShopCarShow">
                    <u-icon name="shopping-cart" size="60"></u-icon>
                    <div class="num" v-if="shopCarInfo.total > 0">{{ shopCarInfo.total }}</div>
                </view>
                <view class="">￥{{ shopCarInfo.totalPrice ? shopCarInfo.totalPrice : 0 }}</view>
            </view>
            <!-- @click="goToPage('createOrder')" -->
            <view :class="{ dis: shopCarInfo.total <= 0 }" @click="checkShopCarInfo">去结算</view>
        </view>
        <CommenFooter :checkIndex="1"></CommenFooter>
        <view class="btn-v-console" @click="togglevc"></view>

        <!-- 当前已下单用户详情 -->
        <view class="orderContent">
            <u-popup v-model="orderListShow" mode="center" :closeable="true">
                <div class="orderDet">
                    <view>{{ myAddress.addressName }}</view>
                    <!-- <view class="">目前已有【{{countInfo.personNum}}】位用户成功下单</view> -->
                    <view>目前已有【{{ orderList && orderList.length != 0 ? orderList[0].pickingSerialNo : 0 }}】位用户成功下单
                    </view>
                    <template v-if="orderList.length != 0">
                        <view class="listContent" id="listContent">
                            <view class="list" v-for="(item, index) in orderList" :key="index">
                                <view>{{ item.pickingSerialNo }}</view>
                                <view>{{ item.nameTakingMeal }}</view>
                                <view>{{ item.nameDishes }}</view>
                                <view>{{ item.createTimeStr }}</view>
                            </view>
                        </view>
                    </template>
                    <u-empty text="暂时还没有人下单哦" mode="page" v-if="orderList.length == 0"></u-empty>
                </div>
            </u-popup>
        </view>

        <!-- 底部地点选择 -->
        <view class="posiBottom">
            <u-popup v-model="posiShow" mode="bottom" :closeable="closeable" :mask-close-able="maskCloseAble"
                @touchmove.stop.prevent="">
                <view class="posiContent">
                    <view class="" v-if="getPosiSuccess">请选择您的地址</view>
                    <view class="" v-else>无法获取到位置信息，您可手动选择大厦下单</view>
                    <view class="listContent">
                        <view class="" v-for="(item, index) in addressList" :key="index">
                            <template v-if="item.state == '是'">
                                <view class="list" @click="checkThisAddress(item)">{{ item.addressName }}</view>
                            </template>
                        </view>
                    </view>
                </view>
            </u-popup>
        </view>
        <!-- 规格选取弹窗 -->
        <view class="specBox">
            <u-popup v-model="specShow" mode="center" :closeable="true">
                <div class="specContent">
                    <view>{{ specInfo.name }}</view>
                    <view class="specList" v-for="(item, index) in specInfo.specList" :key="index">
                        <view class="">{{ item.name }}</view>
                        <view class="">
                            <view v-for="(specItem, specIndex) in item.child" :key="specIndex"
                                :class="{ specCheckList: specItem.checked }" @click="changeSpecCheck(index, specIndex)">
                                <view class="">{{ specItem.name }}</view>
                                <view v-if="specItem.price && !specInfo.hasPrice">{{ specItem.price }}</view>
                            </view>
                        </view>
                    </view>
                </div>
                <view class="specControl">
                    <view class="">
                        总计
                        <text>￥{{ specInfo.total }}</text>
                    </view>
                    <view class="" @click="changeShopNum('spec')">加入购物车</view>
                </view>
            </u-popup>
        </view>
        <!-- 购物车列表 -->
        <view class="shopCarBox" v-if="shopCarShow">
            <view class="shopCarContent">
                <view class="" v-if="shopCarInfo.shopCarList.length != 0">
                    <view class=""></view>
                    <view class="" @click="emptyShopCar"> <u-icon name="trash" size="36"></u-icon>清空购物车 </view>
                </view>
                <view class="listContent">
                    <view class="shopList" v-for="(item, index) in shopCarInfo.shopCarList" :key="index">
                        <view class="">
                            <image :src="item.logo | getImg" mode="aspectFill"></image>
                            <view class="">
                                <view class="">{{ item.storeName }}</view>
                                <view class="">{{ item.storeDescription }}</view>
                            </view>
                        </view>
                        <view class="foodList" v-for="(foodItem, foodIndex) in item.hcShoppingCartList"
                            :key="foodIndex">
                            <!-- <checkbox value="index" :checked="foodItem.checked" ref="childCheckBox" /> -->
                            <view class="" style="margin-left: 10px">
                                <image :src="foodItem.hcCommodity.productPicture | getImg" mode="aspectFill"></image>
                                <view class="">
                                    <view class="">{{ foodItem.hcCommodity.tradeName }}</view>
                                    <view class="" v-if="foodItem.commoditySpecifications">
                                        规格：{{ foodItem.commoditySpecifications }}</view>
                                    <view class="">
                                        <view class="">
                                            ￥{{ foodItem.hcCommodity.commodityPriceCache ?
                                                accMul(foodItem.hcCommodity.commodityPriceCache,
                                            foodItem.commodityQuantity) : foodItem.commodityPrice }}
                                        </view>
                                        <view class="">
                                            <svg @click="shopCarWithChangeNum('down', foodItem, item, foodIndex, index)"
                                                t="1672841614542" class="icon" viewBox="0 0 1024 1024" version="1.1"
                                                xmlns="http://www.w3.org/2000/svg" p-id="5146" width="18" height="18">
                                                <path d="M170.666667 469.333333h682.666666v85.333334H170.666667z"
                                                    fill="#444444" p-id="5147">
                                                </path>
                                            </svg>
                                            <u-input type="text" :clearable="false" v-model="foodItem.commodityQuantity"
                                                placeholder="1" :disabled="true" />
                                            <svg @click="shopCarWithChangeNum('add', foodItem, item, foodIndex, index)"
                                                t="1672841289544" class="icon" viewBox="0 0 1024 1024" version="1.1"
                                                xmlns="http://www.w3.org/2000/svg" p-id="3814" width="15" height="15">
                                                <path
                                                    d="M939.939489 459.072557 562.339502 459.072557 562.339502 83.519182 462.055494 83.519182 462.055494 459.072557 84.455507 459.072557 84.455507 559.356564 462.055494 559.356564 462.055494 939.003164 562.339502 939.003164 562.339502 559.356564 939.939489 559.356564Z"
                                                    fill="#272636" p-id="3815"></path>
                                            </svg>
                                        </view>
                                    </view>
                                </view>
                            </view>
                        </view>
                    </view>
                </view>
                <u-empty text="没有购物车数据,快去挑选商品吧" mode="page" v-if="shopCarInfo.shopCarList.length == 0"></u-empty>
            </view>
        </view>
        <!-- 邀请内容 -->
        <u-popup v-model="visitInfo.visiable" mode="center" :closeable="true">
            <div class="orderDet">
                <view>{{ visitInfo.addressName }}</view>
                <view>目前已有【{{ visitInfo.personNum }}】位用户成功下单</view>
                <view class="listContent">
                    <view class="list" v-for="(item, index) in visitInfo.orderList" :key="index">
                        <view>{{ index + 1 }}</view>
                        <view>{{ item.nameTakingMeal }}</view>
                        <view>{{ item.nameDishes }}</view>
                        <view>{{ item.createTimeStr }}</view>
                    </view>
                </view>
                <u-empty text="暂时还没有人下单哦" mode="page" v-if="visitInfo.orderList.length == 0"></u-empty>
            </div>
        </u-popup>
        <view class="blackBox" :class="{ show: shopCarShow }" @click="shopCarShow = false"></view>
        <u-toast ref="uToast"></u-toast>
        <!-- 当前门店资质 -->
        <view class="storeDet">
            <u-popup v-model="storeDetailVisiable" mode="top" @touchmove.stop.prevent="" :closeable="false">
                <view class="storeContent">
                    <view class="">{{ clickStoreInfo.name }}--门店资质</view>
                    <image :src="item | getImg" mode="aspectFill" v-for="(item, index) in clickStoreInfo.qualifications"
                        :key="index">
                    </image>
                </view>
            </u-popup>
        </view>
        <MyLoading :showLoading="showLoading" :text="loadingText"></MyLoading>
        <view class="warnBox" :class="{ warnBoxShow: warnShow }">
            <view class="">该商家已经打烊</view>
        </view>
    </view>
</template>

<script>
import {
    saveMyAddress,
    getMainCategories,
    getStoreListWithClassForAll,
    getSystemInfo,
    addShopCar,
    getShopCarList,
    getLatelyAddress,
    emptyShopCar,
    getCreateOrderNum,
    getAddressList,
    getAddressById,
    getMyInfo,
    countDayViews,
    setOpenId,
    checkShopCarInfo,
    getStoreMoreFoodList
} from '@/utils/req/api.js'
import MyMinix from '@/utils/minix/minix.js'
import CommenFooter from '@/components/footer/footer.vue'
import Flipper from '@/components/Flipper/Flipper.vue'
import MyLoading from '@/components/loading/loading.vue'

import loadingImg from '@/static/loading.png'
export default {
    mixins: [MyMinix],
    components: {
        CommenFooter,
        Flipper,
        MyLoading,
    },
    data() {
        return {
            loadingImg,

            hiddenFlag: false,
            showLoading: false,
            loadingText: '正在获取您的位置,请稍等',

            go: false,

            getPosiSuccess: false, //获取定位是否成功
            closeable: true, //地址选择框是否可关闭
            maskCloseAble: true, //地址选择框是否点击遮罩层可关闭
            myAddress: {
                id: '',
                addressName: '',
            }, //我当前的位置
            longitude: '', //我当前的经度
            latitude: '', //我当前的纬度
            mainCategorieList: [], //品类列表
            storeName: '', //搜索输入框的双向绑定值
            mainCategoriesId: '', //我所点击的品类ID
            topMenuWidth: '', //
            //系统倒计时的信息
            countInfo: {
                personNum: 0,
                // hour: '00',
                // minute: '00',
                // secound: '00',
                systemSecound1: 0,
                systemSecound2: 0,
                systemMinute1: 0,
                systemMinute2: 0,
                systemHour1: 0,
                systemHour2: 0,
                timer: '',
            },
            timerList: [],
            shopList: [], //首页推荐列表

            orderList: [], //当前定位地址对应的下单列表
            orderListShow: false, //当前已下单列表弹窗的显隐

            posiShow: false, //位置弹窗的显隐
            addressList: [], //所有地址

            specShow: false, //规格弹窗显隐
            specInfo: [], //所展示商品的规格信息

            shopCarShow: false, //购物车的显隐
            shopCarInfo: '', //购物车列表数据
            hasAllCheck: false, //购物车全选按钮的状态，

            //邀请分享的相关信息
            visitInfo: {
                visiable: false,
                personNum: '',
                orderList: [],
            },

            clickStoreInfo: '', //点击商家名称记录的临时信息
            storeDetailVisiable: false,

            orderPageNo: 1, //当前地址下单列表的页码
            orderPageSize: 10, //当前地址下单列表的每页数量
            moreOrderFlag: false, //加载当前地址下单列表的防抖开关
            storePageNo: 1, //门店列表的页码
            storePageSize: 10, //门店列表的每页数量
            moreStoreFlag: false, //门店列表的防抖开关

            warnShow: false,

            shakeFlag: false,

            orderVisible: true, //是否有上一次的订单未查询支付结果

            froms: '', //从哪来

            isSpecial: null,
        }
    },
    onLoad(options) {
        // 登录后返回单店模式
        if (uni.getStorageSync('indexAfterLogin') == 'singleMode') {
            uni.removeStorageSync('indexAfterLogin')
            uni.redirectTo({
                url: '/pages/singleMode',
            })
            return
        }

        let {
            storeName,
            uid,
            aid,
            froms
        } = options
        if (storeName) {
            this.storeName = storeName
        }
        froms && (this.froms = froms)
        if (uid) {
            uni.setStorageSync('uid', uid)
        }
        if (aid) {
            uni.setStorageSync('aid', aid)
        }
        this.showLoading = true

        countDayViews()
    },
    mounted() {
        if (uni.getStorageSync('aid')) {
            this.getVisitInfo(uni.getStorageSync('aid'))
        }

        if (uni.getStorageSync('orderCreateResult')) {
            this.getPayResut()
        }
    },

    destroyed() {
        // clearInterval(this.timer);
    },
    onShow() {
        this.isSpecial = !!uni.getStorageSync('isSpecial')

        if (this.countInfo.timer) {
            clearInterval(this.countInfo.timer)
        }

        this.getSystemInfo(this.countInfo) //不需要地址id

        let fun = () => {
            if (uni.getStorageSync('myCheckAddress') && uni.getStorageSync('myCheckAddress') != 'null') {
                let myAddress = JSON.parse(uni.getStorageSync('myCheckAddress'))
                if (!this.isSpecial && myAddress.id == '1701420180111917057') {
                    // 不是由#bcwl链接跳转来的、但上一单是在冰川网络下单的。
                    uni.removeStorageSync('myCheckAddress')
                    this.getAddressList()
                } else {
                    this.myAddress = myAddress;
                    this._getAddressByid(this.myAddress.id);
                    getAddressList().then(res => {
                        this.addressList = res.data.result;
                        let tempArr = this.addressList.filter(item => item.id == this.myAddress.id);
                        console.log('tempArr', tempArr);
                        this.myAddress = tempArr[0];
                    })
                    this.getCreateOrderNum()
                    this.getMainCategories()
                    this.getStoreList(false, false)
                    this.getShopCarList()
                }
            } else {
                this.getAddressList()
            }
        }

        if (this.isSpecial) {
            getAddressList().then(res => {
                this.addressList = res.data.result
                let checkItem = res.data.result.filter(item => {
                    return item.id == '1701420180111917057'
                })[0]
                uni.setStorageSync('myCheckAddress', JSON.stringify(checkItem))
                fun()
            })
        } else {
            fun()
        }
    },
    onReady() { },
    methods: {
        async _getAddressByid(id) {
            let res = await getAddressById({ id });
            console.log('详细地址信息', res)
        },

        clearCompany() {
            uni.removeStorageSync('isSpecial')
            uni.removeStorageSync('myCheckAddress')
            setTimeout(() => {
                this.$router.go(0)
            }, 500)
        },

        //获取支付结果
        async getPayResut(value) {
            value = value ? value : JSON.parse(uni.getStorageSync('orderCreateResult'))
            let payResult = await getPayResult(value)
            uni.removeStorageSync('orderCreateResult')
            console.log('payResult', payResult)
        },
        //刷新定位--刷新商家数据
        refreshPosi() {
            this.loadingText = '正在刷新您的定位，请稍等'
            this.showLoading = true
            this.getLatLng()
        },
        //获取经纬度--执行后续逻辑
        getLatLng() {
            uni.getLocation({
                type: 'gcj02',
                geocode: true,
                highAccuracyExpireTime: 6000,
                isHighAccuracy: true, //是否开启高精度
                success: async res => {
                    this.getPosiSuccess = true
                    console.log('经纬度res', res)
                    this.longitude = res.longitude
                    this.latitude = res.latitude
                    let addressRes = await getLatelyAddress({
                        latitude: res.latitude,
                        longitude: res.longitude,
                    })
                    if (addressRes.data.success) {
                        uni.setStorageSync('myCheckAddress', JSON.stringify(addressRes.data.result))
                        this.myAddress = addressRes.data.result

                        this.getMainCategories()
                        this.getCreateOrderNum()
                        this.getStoreList(false, false)
                        this.getShopCarList()
                    }
                },
                fail() {
                    this.$showToast.call(this, '位置获取失败,请手动选择地址', 'warning')
                    this.getPosiSuccess = false
                    this.posiShow = true
                    this.closeable = false
                    this.maskCloseAble = false
                },
            })
        },
        //获取我的信息
        async getMyInfo() {
            let res = await getMyInfo()
            if (this.isSpecial) {
                // 由#bcwl链接跳转来的，强行给冰川网络的id
                res.data.result.addressId = '1701420180111917057'
            } else {
                if (res.data.result && res.data.result.addressId == '1701420180111917057') {
                    // 不是由#bcwl链接跳转来的、但上一单是在冰川网络下单的，重置id，强行让用户重新选择大厦
                    res.data.result.addressId = null
                }
            }

            console.log('我的信息', res)
            let flag = false
            if (res.data.result && res.data.result.addressId) {
                if (this.addressList && this.addressList.length != 0) {
                    let item = this.addressList.find(item => {
                        return item.id == res.data.result.addressId
                    })
                    console.log('item', item)
                    if (item) {
                        this.myAddress = item
                        console.log('this.myAddress', this.myAddress)
                        flag = true

                        if (this.isSpecial) {
                            uni.setStorageSync('myCheckAddress', JSON.stringify(item))
                        }
                    } else {
                        this.posiShow = true
                        this.closeable = false
                        this.maskCloseAble = false
                        flag = false
                    }
                }
            } else {
                this.posiShow = true
                this.closeable = false
                this.maskCloseAble = false
            }
            // res.data.result.addressId = null;
            if (flag) {
                this.getMainCategories()
                this.getCreateOrderNum()
                this.getStoreList(false, false)
                this.getShopCarList()
            }
            this.showLoading = false
        },
        //展示门店资质
        showStoreDet(value) {
            this.clickStoreInfo = {
                name: value.storeName,
                qualifications: value.qualifications.split(','),
            }
            this.storeDetailVisiable = true
        },
        //banner点击新开窗口
        openNewWindow(value) {
            if (value.link) {
                window.location.href = value.link
            }
            // window.open(value.link);
        },
        //获取系统倒计时
        async getSystemInfo(obj) {
            let res = await getSystemInfo()
            let {
                morning_time_begin,
                morning_time_end,
                afternoon_time_begin,
                afternoon_time_end
            } = res.data.result
            let arr = [{
                startTime: morning_time_begin,
                endTime: morning_time_end,
            },
            {
                startTime: afternoon_time_begin,
                endTime: afternoon_time_end,
            },
            ]
            this.initCountDown('system', arr)
        },
        //获取主营分类
        async getMainCategories() {
            let res = await getMainCategories({
                addressId: this.myAddress.id,
            })
            this.mainCategorieList = res.data.result
            this.$nextTick(() => {
                this.topMenuWidth = 72 * this.mainCategorieList.length
            })
        },
        /**
         * 获取首页商铺和商品列表
         * isClickCategories：是否是从主营品类点击
         * isPush：是否是触底加载更多需要push
         * */
        async getStoreList(isClickCategories, isPush) {
            console.log('isClickCategories', isClickCategories)
            console.log('isPush', isPush)
            if (!isClickCategories) {
                this.mainCategoriesId = ''
            }
            if (!isPush) {
                this.storePageNo = 1
                this.shopList = []
            }

            let res = await getStoreListWithClassForAll({
                pageNo: this.storePageNo,
                pageSize: this.storePageSize,
                storeName: this.storeName,
                mainCategoriesId: this.mainCategoriesId,
                addressId: this.myAddress.id,
            })

            // console.log(res, 8888888888888)
            if (!res.data.success) {
                uni.removeStorageSync('myCheckAddress')
                this.$router.go(0)
            }

            console.log('获取商铺列表-----参数addressId:', this.myAddress.id)
            console.log('获取商铺列表-----获取结果数量及数据:', res.data.result.records.length, res.data.result.records)

            res.data.result.records.forEach(item => {
                item.maxShow = true // 去电查看更多，现在是每次查询全部。2023-11-9
                // item.maxShow = false;
                item.hcCommodityList.forEach(foodItem => {
                    foodItem.num = foodItem.shoppingCartCount
                    if (foodItem.specificationsFlag == '是') {
                        foodItem.hasSpec = true
                    }
                    foodItem.remainingQuantity = foodItem.remainingQuantity - foodItem.num
                    foodItem.remainingQuantity = foodItem.remainingQuantity > 0 ? foodItem
                        .remainingQuantity : 0
                })
                let tempArr = []
                JSON.parse(item.businessHours).forEach((item, index) => {
                    if (item.startTime && item.endTime) {
                        tempArr.push(item.startTime + '~' + item.endTime)
                    }
                })
                item.businessTime = tempArr.join(',')
                this.initCountDown('store', item, JSON.parse(item.businessHours))
                this.shopList.push(item)
            })

            this.showLoading = false
        },
        //查看更多
        changeMaxShow(shopCheckIndex) {
            console.log('---------')
            console.log(this.shopList[shopCheckIndex])
            this.shopList[shopCheckIndex].maxShow = true
            this.clickMoreInfo = {
                checkIndex: shopCheckIndex,
                merchantId: this.shopList[shopCheckIndex].id,
            }
            this.getStoreMoreFoodList()
        },
        async getStoreMoreFoodList() {
            let res = await getStoreMoreFoodList({
                pageNo: 1,
                pageSize: -1,
                storeName: '',
                mainCategoriesId: '',
                addressId: this.myAddress.id,
                id: this.clickMoreInfo.merchantId,
            })
            console.log('更多的商品信息', res)

            res.data.result.forEach(foodItem => {
                foodItem.num = foodItem.shoppingCartCount
                if (foodItem.specificationsFlag == '是') {
                    foodItem.hasSpec = true
                }
                foodItem.remainingQuantity = foodItem.remainingQuantity - foodItem.num
                foodItem.remainingQuantity = foodItem.remainingQuantity > 0 ? foodItem.remainingQuantity :
                    0
            })
            this.shopList[this.clickMoreInfo.checkIndex].hcCommodityList = res.data.result
        },
        //获取购物车列表
        async getShopCarList() {
            console.log('我在加载购物车')
            let res = await getShopCarList({
                addressId: this.myAddress.id,
            })
            let total = 0,
                totalPrice = 0
            res.data.result.forEach(item => {
                item.hcShoppingCartList.forEach((foodItem, foodIndex) => {
                    total = total + foodItem.commodityQuantity
                    foodItem.checked = false
                    totalPrice = this.accAdd(totalPrice, foodItem.commodityPrice)
                })
            })
            this.shopCarInfo = {
                total,
                shopCarList: res.data.result,
                totalPrice,
            }
        },
        //获取我当前地址对应的当日下单数
        async getCreateOrderNum(type) {
            let res = await getCreateOrderNum({
                pageNo: this.orderPageNo,
                pageSize: -1,
                addressId: this.myAddress.id,
            })
            console.log('length', res.data.result.records.length)
            this.orderList = res.data.result.records
            this.$nextTick(() => {
                this.$set(this.countInfo, 'personNum', res.data.result.records.length)
                this.$forceUpdate()
            })
        },
        //获取地址列表
        async getAddressList() {
            let res = await getAddressList()
            this.addressList = res.data.result
            this.getMyInfo()
        },
        //点击选择当前地址--编辑我的地址id，获取最新地址对应的商家列表
        async checkThisAddress(item) {
            this.shopList = []

            this.loadingText = '正在获取对应的店铺数据，请稍等'
            this.showLoading = true
            this.myAddress = item
            console.log(item)
            getApp().globalData.myAddress = item
            this.posiShow = false

            uni.setStorageSync('myCheckAddress', JSON.stringify(item))

            this.myAddress = item

            this.getMainCategories()
            this.getStoreList(false, false)
            this.getShopCarList()
            this.getCreateOrderNum()

            this.closeable = true
            this.maskCloseAble = true
        },
        //切换主营品类
        changeState(index) {
            this.mainCategoriesId = this.mainCategorieList[index].id
            this.getStoreList(true, false)
        },
        //展示当前下单用户列表
        showOrderList() {
            this.orderListShow = true
            this.$nextTick(() => {
                document.getElementById('listContent').addEventListener('scroll', this.getMoreOrder, true)
            })
        },
        //展示位置选择列表
        showPosi() {
            this.posiShow = true
        },
        //展示商品规格选择弹窗
        showSpecAlert(shopIndex, foodIndex) {
            let checkItem = this.shopList[shopIndex].hcCommodityList[foodIndex]
            let total = 0,
                hasPrice = false
            let specList = JSON.parse(checkItem.commoditySpecifications)
            console.log('specList', specList)
            specList.forEach(item => {
                item.child.forEach((childItem, childIndex) => {
                    childIndex == 0 ? (childItem.checked = true) : (childItem.checked = false)
                    childIndex == 0 && (total = Number(total) + Number(childItem.price))
                })
            })
            if (checkItem.commodityPrice) {
                total = checkItem.commodityPriceCache
                hasPrice = true
            }
            this.specInfo = {
                shopIndex,
                foodIndex,
                total,
                hasPrice,
                shopId: checkItem.id,
                specList,
                name: checkItem.tradeName,
                num: checkItem.shoppingCartCount,
                storeState: this.shopList[shopIndex].businessState,
                limitBuy: this.shopList[shopIndex].hcCommodityList[foodIndex].limitBuy,
                remainingQuantity: this.shopList[shopIndex].hcCommodityList[foodIndex].remainingQuantity,
                merchantId: this.shopList[shopIndex].id,
            }
            this.specShow = true
            console.log('specInfo', this.specInfo)
        },
        //更改规格的选中状态
        changeSpecCheck(listIndex, childIndex) {
            this.$nextTick(() => {
                let total = 0
                this.specInfo.specList[listIndex].child.forEach((item, index) => {
                    if (index == childIndex) {
                        item.checked = true
                    } else {
                        item.checked = false
                    }
                })
                this.specInfo.specList.forEach(item => {
                    item.child.forEach(childItem => {
                        if (childItem.checked) {
                            total = total + Number(childItem.price)
                        }
                    })
                })
                if (!this.specInfo.hasPrice) {
                    this.specInfo.total = total
                }
            })
        },
        //展示列表的购物车加减以及规格弹窗的添加至购物车
        async changeShopNum(type, shopCheckIndex, foodCheckIndex, value, listValue) {
            if (type == 'spec' && this.specInfo.limitBuy > -1 && this.specInfo.num >= this.specInfo
                .remainingQuantity) {
                this.$showToast.call(this, '库存不足，无法继续添加', 'warning')
                return
            }

            if (type == 'spec' && this.specInfo.storeState == '打烊') {
                this.warnShow = true
                setTimeout(() => {
                    this.warnShow = false
                }, 3000)
                return
            }
            if (type == 'add' && listValue.businessState == '打烊') {
                this.warnShow = true
                setTimeout(() => {
                    this.warnShow = false
                }, 3000)
                return
            }

            // if (type == 'add' && value.limitBuy > -1 && value.num >= value.remainingQuantity) {
            // 	this.$showToast.call(this, '已超出库存，无法继续添加', 'warning');
            // 	return;
            // }
            if (type == 'add' && value.limitBuy > -1 && value.remainingQuantity <= 0) {
                this.$showToast.call(this, '已超出库存，无法继续添加', 'warning')
                return
            }
            if (type == 'down') {
                if (value.num == 0) {
                    return
                }
            }
            if (!this.shakeFlag) {
                //设置防抖节点
                this.shakeFlag = true
                // let oldVal, num, obj;
                let oldVal, obj

                let merchantId
                let commodityId
                if (type == 'add' || type == 'down') {
                    merchantId = this.shopList[shopCheckIndex].id
                    commodityId = this.shopList[shopCheckIndex].hcCommodityList[foodCheckIndex].id
                    let oldNum = this.shopList[shopCheckIndex].hcCommodityList[foodCheckIndex].num
                    let commodityQuantity = type == 'add' ? 1 : -1
                    this.shopList[shopCheckIndex].hcCommodityList[foodCheckIndex].num = oldNum + commodityQuantity

                    let oldRemainingQuantity = this.shopList[shopCheckIndex].hcCommodityList[foodCheckIndex]
                        .remainingQuantity
                    this.shopList[shopCheckIndex].hcCommodityList[foodCheckIndex].remainingQuantity = type ==
                        'add' ? oldRemainingQuantity - 1 : oldRemainingQuantity + 1
                    obj = {
                        commodityId,
                        commodityQuantity,
                        commoditySpecifications: '',
                        addressId: this.myAddress.id,
                    }
                }
                let tempArr = [],
                    tempPrice = 0
                if (type == 'spec') {
                    this.specInfo.specList.forEach(item => {
                        item.child.forEach(childItem => {
                            if (childItem.checked) {
                                tempArr.push(childItem.name)
                                tempPrice = tempPrice + childItem.price
                            }
                        })
                    })
                    obj = {
                        commodityId: this.specInfo.shopId,
                        commodityQuantity: 1,
                        commoditySpecifications: tempArr.join(','),
                        addressId: this.myAddress.id,
                    }

                    merchantId = this.specInfo.merchantId
                    commodityId = this.specInfo.shopId
                    let merchantIndex = this.specInfo.shopIndex
                    let foodIndex = this.specInfo.foodIndex

                    this.shopList[merchantIndex].hcCommodityList[foodIndex].num++
                }
                let res = await addShopCar(obj)
                this.getShopCarList() // 重新获取购物车信息

                let mIndex = type == 'add' || type == 'down' ? shopCheckIndex : this.specInfo.shopIndex
                let pIndex = type == 'add' || type == 'down' ? foodCheckIndex : this.specInfo.foodIndex
                console.log(this.shopList[mIndex])
                let {
                    id,
                    logo,
                    storeDescription,
                    storeName,
                    businessState,
                    businessHours,
                    hcCommodityList
                } = this.shopList[mIndex]
                let proInfo = hcCommodityList[pIndex]
                let {
                    commodityPrice,
                    commodityPriceCache,
                    tradeName,
                    remainingQuantity,
                    productPicture,
                    limitBuy,
                    specificationsFlag,
                    delFlag,
                    num
                } = proInfo
                //点击的商品组成的购物车商家对象
                let shopCarMerchantObj = {
                    id,
                    logo,
                    storeDescription,
                    storeName,
                    businessState,
                    businessHours,
                }
                //点击的商品组成的购物车商品对象
                let shopCarFoodInfo = {
                    remainingQuantity,
                    id: '',
                    // userId:this.myInfo.id,
                    merchantId: id,
                    commodityId: proInfo.id,
                    commodityQuantity: num,
                    commodityPrice: commodityPriceCache,
                    commoditySpecifications: tempArr.join(','),
                    hcCommodity: {
                        id: proInfo.id,
                        merchantId: id,
                        tradeName: tradeName,
                        commodityPrice,
                        productPicture,
                        limitBuy,
                        specificationsFlag,
                        delFlag,
                        commoditySpecifications: proInfo.commoditySpecifications,
                        commodityPriceCache,
                    },
                }

                if (this.shopCarInfo.shopCarList.length == 0) {
                    shopCarMerchantObj.hcShoppingCartList = [shopCarFoodInfo]
                    this.shopCarInfo.shopCarList.push(shopCarMerchantObj)
                } else {
                    let flag = false,
                        merchantFlag = false
                    //用点击的商品id，商家id与购物车数组进行比较--如存在记录则直接计算，不存在则加购物车的接口
                    for (let j = 0; j < this.shopCarInfo.shopCarList.length; j++) {
                        let item = this.shopCarInfo.shopCarList[j]
                        let index = j
                        //如果存在与店家商品对应商家的id一致的则继续执行
                        if (merchantId == item.hcShoppingCartList[0].hcCommodity.merchantId) {
                            for (let i = 0; i < item.hcShoppingCartList.length; i++) {
                                let foodItem = item.hcShoppingCartList[i]
                                let foodIndex = i
                                //如果购物车对应商家存在对应商品id则继续执行
                                if (foodItem.hcCommodity.id == commodityId) {
                                    console.log('我是重复的商品')
                                    if (type == 'spec') {
                                        console.log('44', tempArr.join(','), '55', foodItem
                                            .commoditySpecifications)
                                        if (tempArr.join(',') == foodItem.commoditySpecifications) {
                                            console.log('9999999999')
                                            flag = true
                                            foodItem.commodityQuantity = foodItem.commodityQuantity + 1
                                            break
                                        }
                                    } else {
                                        flag = true
                                        console.log('我不是规格')
                                        //将购物车对应商品的数量进行加减
                                        foodItem.commodityQuantity = type == 'add' ? foodItem.commodityQuantity +
                                            1 : foodItem.commodityQuantity - 1
                                        //如果对应商品数量为0则删除对应商品
                                        if (foodItem.commodityQuantity == 0) {
                                            this.shopCarInfo.shopCarList[index].hcShoppingCartList.splice(
                                                foodIndex, 1)
                                            //如果对应商家的商品种类为0则删除商家
                                            if (this.shopCarInfo.shopCarList[index].hcShoppingCartList.length ==
                                                0) {
                                                this.shopCarInfo.shopCarList.splice(index, 1)
                                            }
                                        }
                                    }
                                }
                            }
                            //没有重合的商品和规格直接添加
                            if (!flag && type == 'spec') {
                                console.log('我没有重复的规格')
                                shopCarFoodInfo.commodityQuantity = 1
                                shopCarFoodInfo.hcCommodity.commodityPriceCache = this.specInfo.total
                                console.log('shopCarFoodInfo.commodityQuantity=1', shopCarFoodInfo
                                    .commodityQuantity == 1)
                                item.hcShoppingCartList.push(shopCarFoodInfo)
                            }
                            //没有重复的商品直接添加
                            if (!flag && type != 'spec') {
                                console.log('我没有重复的商品')
                                item.hcShoppingCartList.push(shopCarFoodInfo)
                            }
                            merchantFlag = true
                            break
                        }
                    }
                    //没有重合的商家直接添加
                    if (!merchantFlag) {
                        console.log('我没有重合的商家')
                        shopCarMerchantObj.hcShoppingCartList = [shopCarFoodInfo]
                        this.shopCarInfo.shopCarList.push(shopCarMerchantObj)
                    }
                }
                console.log('我结束了')
                console.log(this.shopCarInfo.shopCarList)
                //将删除后的购物车数据重新进行汇总--算商品总数量以及商品总价
                this.getShopCarTotal()

                //关闭防抖节点
                this.shakeFlag = false
                this.specShow = false
                this.specInfo = ''
            }
        },
        //展示购物车列表
        changeShopCarShow() {
            this.shopCarShow = !this.shopCarShow
        },
        // 全选状态更改
        changeAllCheck() {
            this.hasAllCheck = !this.hasAllCheck
        },
        // 购物车处的数量减
        down(shopIndex, listIndex) {
            let oldNum = this.shopCarList[shopIndex].foodList[listIndex].num
            this.shopCarList[shopIndex].foodList[listIndex].num = oldNum <= 1 ? 1 : oldNum - 1
        },
        // 购物车处的数量加
        add(shopIndex, listIndex) {
            let oldNum = this.shopCarList[shopIndex].foodList[listIndex].num
            this.shopCarList[shopIndex].foodList[listIndex].num = oldNum + 1
        },
        //页面跳转公用函数
        goToPage(type) {
            if (type == 'createOrder' && this.shopCarInfo.total <= 0) {
                this.$showToast.call(this, '请添加商品至购物车之后再进行结算', 'warning')
                return
            }
            let url
            switch (type) {
                case 'index':
                    url = '/pages/index/index'
                    break
                case 'createOrder':
                    url = '../my/order/createOrder?addressId=' + this.myAddress.id
                    break
                case 'my':
                    url = '../my/my'
                    break
                case 'company':
                    url = '/pages/order'
                    break
            }
            uni.navigateTo({
                url,
            })
        },
        //购物车列表的数量加减
        async shopCarWithChangeNum(type, value, listValue, foodIndex, index) {
            if (type == 'add' && listValue.businessState == '打烊') {
                this.$showToast.call(this, '商家已经打样', 'warning')
                return
            }
            if (type == 'add' && value.hcCommodity.limitBuy > -1 && value.commodityQuantity >= value
                .remainingQuantity) {
                this.$showToast.call(this, '已超出库存，无法继续添加', 'warning')
                return
            }
            let commodityQuantity = 0
            if (type == 'add') {
                commodityQuantity = 1
            } else {
                if (value.commodityQuantity == 0) {
                    return
                }
            }
            let obj = {
                commodityId: value.hcCommodity.id,
                commodityQuantity: type == 'add' ? 1 : -1,
                commoditySpecifications: value.commoditySpecifications,
                addressId: this.myAddress.id,
            }
            let res = await addShopCar(obj)
            this.shopList.forEach(item => {
                item.hcCommodityList.forEach(childItem => {
                    if (childItem.id == value.id) {
                        childItem.commodityQuantity = type == 'add' ? childItem.commodityQuantity +
                            1 : childItem.commodityQuantity - 1
                        childItem.remainingQuantity = type == 'add' ? childItem.commodityQuantity -
                            1 : childItem.remainingQuantity + 1
                    }
                })
            })
            this.shopList.forEach(item => {
                item.hcCommodityList.forEach(childItem => {
                    if (childItem.id == value.commodityId) {
                        childItem.value = type == 'add' ? (childItem.num = childItem.num + 1) : (
                            childItem.num = childItem.num - 1)
                        childItem.remainingQuantity = type == 'add' ? childItem.remainingQuantity -
                            1 : childItem.remainingQuantity + 1
                    }
                })
            })

            // this.getShopCarList();

            //缓存点击购物车对应商品的数量
            let num = this.shopCarInfo.shopCarList[index].hcShoppingCartList[foodIndex].commodityQuantity
            //如果是减数量
            if (type == 'down') {
                //如果点击商品的购物车数量为1则继续执行
                if (num == 1) {
                    //如果点击该商家的购物车商品种类为1则删掉该购物车商家数据
                    if (this.shopCarInfo.shopCarList[index].hcShoppingCartList.length == 1) {
                        this.shopCarInfo.shopCarList.splice(index, 1)
                    } else {
                        //如果点击该商家的购物车商品种类不为1则删掉该该购物车商品数据
                        this.shopCarInfo.shopCarList[index].hcShoppingCartList.splice(foodIndex, 1)
                    }
                } else {
                    //如果点击该商家的购物车商品种类不为1则正常减数量
                    this.shopCarInfo.shopCarList[index].hcShoppingCartList[foodIndex].commodityQuantity = num - 1
                }
            } else {
                //正常加数量
                this.shopCarInfo.shopCarList[index].hcShoppingCartList[foodIndex].commodityQuantity = num + 1
            }
            //对购物车重新进行汇总--商品总数量以及商品总价
            this.getShopCarTotal()
        },
        //对购物车重新进行汇总--商品总数量以及商品总价
        getShopCarTotal() {
            let total = 0,
                totalPrice = 0
            this.shopCarInfo.shopCarList.forEach(item => {
                item.hcShoppingCartList.forEach((foodItem, foodIndex) => {
                    total = total + foodItem.commodityQuantity
                    foodItem.checked = false
                    console.log('+++++', foodItem.hcCommodity)
                    console.log('-----', foodItem)
                    totalPrice = this.accAdd(totalPrice, foodItem.hcCommodity.commodityPriceCache ?
                        this.accMul(foodItem.hcCommodity.commodityPriceCache, foodItem
                            .commodityQuantity) : foodItem.commodityPrice)
                })
            })
            this.shopCarInfo.total = total
            this.shopCarInfo.totalPrice = totalPrice
        },
        //清空购物车
        async emptyShopCar() {
            let shopCarWidthMerchantIdArr = [] //用于存储所有购物车列表的商家id
            let shopCarWithFoodIdArr = [] //用于存储所有购物车列表的商品id
            this.shopCarInfo.shopCarList.forEach((shopCarItem, shopCarIndex) => {
                console.log('shopCarItem', shopCarItem)
                shopCarWidthMerchantIdArr.push(shopCarItem.hcShoppingCartList[0].hcCommodity.merchantId)
                shopCarItem.hcShoppingCartList.forEach((foodItem, foodIndex) => {
                    shopCarWithFoodIdArr.push({
                        foodId: foodItem.hcCommodity.id,
                        num: foodItem.commodityQuantity,
                    })
                })
            })
            //将购物车的商家id转成字符串--便于后面用indexOf的方式判断商家是否包含该店铺（少写一层循环）
            let shopCarWidthMerchantIdStr = shopCarWidthMerchantIdArr.join(',')
            //循环判断商品列表和购物车列表重合的地方
            this.shopList.forEach((shopItem, shopIndex) => {
                //如果要清除的购物车数据与商品列表有重合的商家则继续执行
                if (shopCarWidthMerchantIdStr.indexOf(shopItem.id) != -1) {
                    shopItem.hcCommodityList.forEach((foodItem, foodIndex) => {
                        shopCarWithFoodIdArr.forEach((shopCarFoodItem, shopCarFoodIndex) => {
                            //如果要清除的购物车数据与商品列表有重合的商品则继续执行
                            if (shopCarFoodItem.foodId == foodItem.id) {
                                foodItem.remainingQuantity = foodItem.remainingQuantity +
                                    foodItem.num //将清除的数据重新增加到'剩余数量'
                                foodItem.num = 0 //清除对应的input数据
                            }
                        })
                    })
                }
            })
            //将购物车列表及数据清空
            this.shopCarInfo = {
                total: 0,
                totalPrice: 0,
                shopCarList: [],
            }

            let res = await emptyShopCar()
            this.shopCarShow = false

            // this.getShopCarList();
            // this.getStoreList()
        },
        //获取邀请链接对应的信息以及下单数
        async getVisitInfo(aid) {
            let res = await getCreateOrderNum({
                addressId: aid,
            })
            let addressRes = await getAddressById({
                id: aid,
            })
            console.log('addressRes', addressRes)
            this.visitInfo = {
                personNum: res.data.result.records.length,
                orderList: res.data.result.records,
                addressName: addressRes.data.result.addressName,
                visiable: true,
            }
            uni.removeStorageSync('aid')
        },

        //下拉触底加载更多当前地址的下单记录
        getMoreOrder() {
            let scrollTop = document.getElementById('listContent').scrollTop //滚动高度
            let clientHeight = document.getElementById('listContent').clientHeight //可视高度
            let scrollHeight = document.getElementById('listContent').scrollHeight //内容高度
            if (scrollHeight - scrollTop - 10 <= clientHeight) {
                if (!this.moreOrderFlag) {
                    this.moreOrderFlag = true
                    if (this.orderList.length != 0 && this.orderList.length % 10 == 0) {
                        this.orderPageNo = this.orderPageNo + 1
                        this.getCreateOrderNum('push')
                        setTimeout(() => {
                            this.moreOrderFlag = false
                        }, 1000)
                    }
                }
            }
        },
        changeHiddenState(record) {
            this.hiddenFlag = record
        },
        async checkShopCarInfo() {
            let res = await checkShopCarInfo({
                addressId: this.myAddress.id,
            })
            console.log('res', res)
            if (res.data.success) {
                uni.navigateTo({
                    url: '../my/order/createOrder?addressId=' + this.myAddress.id,
                })
            } else {
                this.$showToast.call(this, res.data.message, 'default', 4000)

                // uni.navigateTo({
                // 	url: '../my/order/createOrder?addressId=' + this.myAddress.id
                // })
            }
        },

        // 控制vconsole显示
        togglevc() {
            if (this.count === undefined) {
                this.count = 0
            }
            if (this.lastClickTime === undefined) {
                this.lastClickTime = 0
            }
            const nowTime = new Date().getTime()
            if (nowTime - this.lastClickTime < 5000) {
                this.count++
            }
            this.lastClickTime = nowTime
            if (this.count == 5) {
                const vconDom = document.getElementById('__vconsole')
                if (uni.getStorageSync('aabbcc') == '1') {
                    vconDom.style.display = 'block'
                }
            }
        },
    },
    onReachBottom() {
        console.log('我出低了哦', this.moreStoreFlag)
        if (!this.moreStoreFlag) {
            if (this.shopList.length != 0 && this.shopList.length % this.storePageSize == 0) {
                this.storePageNo = this.storePageNo + 1
                this.moreStoreFlag = true
                if (this.mainCategoriesId) {
                    this.getStoreList(true, true)
                } else {
                    this.getStoreList(false, true)
                }
                setTimeout(() => {
                    this.moreStoreFlag = false
                }, 1000)
            }
        }
    },
    watch: {
        //监控是否全选
        hasAllCheck(newVal) {
            this.shopCarInfo.shopCarList.forEach((item, index) => {
                item.hcShoppingCartList.forEach(foodItem => {
                    foodItem.checked = newVal
                })
            })
        },
    },
    destory() { },
    onHide() {
        this.timerList.forEach(val => {
            clearInterval(val)
        })
        this.timerList = []
        this.storePageNo = 1
    },
    watch: {
        orderListShow(newVal) {
            this.changeHiddenState(newVal)
        },
        posiShow(newVal) {
            this.changeHiddenState(newVal)
        },
        specShow(newVal) {
            this.changeHiddenState(newVal)
        },
        shopCarShow(newVal) {
            this.changeHiddenState(newVal)
        },
        'visitInfo.visiable'(newVal) {
            this.changeHiddenState(newVal)
        },
        storeDetailVisiable(newVal) {
            this.changeHiddenState(newVal)
        },
    },
}
</script>

<style lang="scss" scoped>
.indexBig {
    min-height: 100vh;
    background: linear-gradient(104.49deg, #ff602e 1.8%, #f96a02 103.57%);
    background-size: 100% 100vh;
    background-repeat: no-repeat;
    overflow: hidden;
}

.change {
    font-size: 30rpx;
    color: #fff;
    margin-left: 40rpx;
    margin-top: 20rpx;
}

.hidden {
    // max-height: 100vh;
    // overflow-y: hidden;
}

.top {
    padding: 20rpx 40rpx;
    color: #fff;

    @include flexs();

    >view {
        flex: 1;

        >view:nth-child(2) {
            // max-width: 400rpx;
            max-width: 80%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        @include flexs();

        image {
            width: 30rpx;
            height: 30rpx;

            &:nth-child(3) {
                width: 20rpx;
                height: 20rpx;
            }
        }

        .refresh {
            margin-left: 10rpx;
        }

        view {
            margin: 0 10rpx;
        }
    }

    >image {
        width: 50rpx;
        height: 50rpx;
        margin-left: 20rpx;
    }
}

.searchBox {
    width: calc(100% - 80rpx);
    margin: 10rpx auto;
    padding: 0 20rpx;
    background-color: #fff;
    border-radius: 20rpx;
    @include flexs();

    image {
        width: 50rpx;
        height: 50rpx;
    }

    view {
        width: calc(28rpx * 2);
        font-size: 28rpx;
        line-height: 2;
        color: #fb6710;
        padding: 10rpx 0;
    }
}

.content {
    background-color: #f5f5f5;
    min-height: 80vh;
    margin: 40rpx 0;
    border-top-left-radius: 40rpx;
    border-top-right-radius: 40rpx;
    padding-bottom: 200rpx;

    /deep/ {
        .u-empty {
            padding: 80rpx 0;
            background-color: #fff;
            width: calc(100% - 40rpx);
            margin: 0 auto;
            border-radius: 10rpx;
        }
    }

    .topMenuBig {
        padding: 0 40rpx;
        padding: 40rpx 0;
        border-top-left-radius: 40rpx;
        border-top-right-radius: 40rpx;
        width: 100%;
        background: linear-gradient(180deg, #ffffff 49.7%, rgba(255, 255, 255, 0) 100%);
    }

    .topMenuBox {
        width: calc(100vw - 40rpx);
        margin: 0 20rpx;
        transform: rotate(0deg);
        -webkit-transform: rotate(0deg);
        overflow: hidden;
        overflow-x: scroll;
        overflow-y: hidden;

        &::-webkit-scrollbar {
            width: 0;
            height: 0;
            background-color: #f5f5f5;
        }

        &::-webkit-scrollbar-track {
            -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
            border-radius: 0;
            background-color: #f5f5f5;
        }

        &::-webkit-scrollbar-thumb {
            border-radius: 0;
            -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
            background-color: #555;
        }
    }

    .topMenuBox {
        @include flexs(flex-start, center);
        flex-wrap: wrap;
    }

    // .topMenu {
    // 	margin: 0 auto;
    // @include flexs(flex-start, center);
    // 	flex-wrap: nowrap;

    .list {
        width: 140rpx;
        font-size: 26rpx;
        line-height: 2;
        text-align: center;
        flex-shrink: 0;

        &:active {
            transform: scale(1.1);
        }

        .imageContent {
            width: 104rpx;
            padding-bottom: 104rpx;
            position: relative;
            margin: 0 auto;

            image {
                width: 100%;
                height: 100%;
                position: absolute;
                left: 0;
                top: 0;
                // border-radius: 50%;
            }
        }

        &:nth-child(1) {
            margin-left: 0;
        }
    }

    // }

    .swiperContent {
        width: calc(100% - 40rpx);
        background-color: #fff;
        margin: 0 20rpx 40rpx 20rpx;
        border-radius: 20rpx;
        transform: rotate(0deg);
        -webkit-transform: rotate(0deg);
        overflow: hidden;

        /deep/swiper {
            height: 300rpx;
        }

        .countTop {
            padding: 20rpx 20rpx;
            background-color: #ffe2cd;
            height: 100rpx;
            @include flexs(space-between, center);
            font-size: 28rpx;
            color: #513f10;

            text {
                font-size: 50rpx;
                margin: 0 10rpx;
                font-weight: 900;
                color: #fc360b;
            }
        }

        .countCount {
            background-color: #ffece1;
            padding: 40rpx 0 60rpx 0;
            @include flexs(center, center);
            flex-direction: column;
            letter-spacing: 4rpx;
            perspective: 1000;
            height: 300rpx;

            >view {
                @include flexs();
                color: #7a642c;

                transition: 0.6s;
                transform-style: preserve-3d;

                &:nth-child(2) {
                    margin-top: 10rpx;
                }

                >view {
                    letter-spacing: 0;
                    font-size: 120rpx;
                    line-height: 1;
                    font-weight: 900;
                    color: #fc700b;
                    // margin-top: 20rpx;
                    @include flexs();

                    &:nth-child(2),
                    &:nth-child(4) {
                        margin: 0 10rpx;
                    }
                }

                .card {
                    letter-spacing: 0;
                    font-size: 120rpx;
                    line-height: 1;
                    font-weight: bold;
                    color: #fc700b;
                    transform-origin: bottom;

                    // animation-iteration-count: infinite;
                    animation: show 1s infinite;
                }
            }
        }

        .imageContent {
            width: 100%;
            height: 100%;
            // padding-bottom: 48%;
            position: relative;

            image {
                position: absolute;
                left: 0;
                top: 0;
                bottom: 0;
                right: 0;
                max-width: 100%;
                max-height: 100%;
                margin: 0 auto;
                width: 100%;
                height: 100%;
            }
        }
    }
}

.hotelBox {
    padding: 0 20rpx;
}

.hotellList {
    border-radius: 40rpx;
    padding: 40rpx 20rpx;
    background-color: #fff;
    margin-bottom: 40rpx;

    .hotelInfo {
        @include flexs();
        position: relative;

        .fixBox {
            width: 100%;
            height: 100%;
            position: absolute;
            left: 0;
            top: 0;
            background-color: rgba(0, 0, 0, 0.55);
            color: #fff;
            font-size: 32rpx;
            @include flexs(center, center);
        }

        image {
            width: 150rpx;
            height: 150rpx;
            border-radius: 10rpx;
            flex-shrink: 0;
        }

        .topRight {
            width: calc(100% - 170rpx);
            margin-left: 20rpx;
            @include flexs(space-between, flex-start);
            flex-direction: column;

            >view:nth-child(1) {
                width: 100%;
                @include flexs(space-between, center);

                >view:nth-child(1) {
                    font-size: 32rpx;
                    font-weight: bold;
                    flex: 1;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    white-space: nowrap;
                }

                >.notEnd {
                    @include flexs(flex-end, center);
                    width: 37%;
                    flex-shrink: 0;
                    font-size: 22rpx;
                    color: rgba(0, 0, 0, 0.55);

                    >view:nth-child(1) {
                        margin-left: 10rpx;
                        background: linear-gradient(271.21deg, #f25b48 -4.12%, #f68758 99.23%);
                        color: #fff;
                        padding: 0 5rpx;
                        border-bottom-left-radius: 5rpx;
                        border-top-left-radius: 5rpx;
                    }

                    >view:nth-child(2) {
                        background: #ffdddd;
                        padding: 0 5rpx;
                        color: #ff0000;
                        font-weight: bold;
                        border-top-right-radius: 5rpx;
                        border-bottom-right-radius: 5rpx;
                    }
                }

                >.end {
                    background-color: #e9ebed;
                    border-radius: 20rpx;
                    color: rgba(0, 0, 0, 0.55);
                    font-size: 22rpx;
                    line-height: 1.5;
                    padding: 0 10rpx;

                    text {
                        color: #040404;
                        margin-left: 10rpx;
                    }
                }
            }

            >view:nth-child(2) {
                @include flexs(flex-start, center);
                font-size: 24rpx;
                line-height: 2;
                width: 100%;

                >view {
                    width: calc(100% / 3);
                    flex: 1;
                }

                text {
                    color: #f52a2a;
                    margin-left: 10rpx;
                }
            }

            >view:nth-child(3) {
                width: 100%;
                @include flexs(space-between, center);
                font-size: 22rpx;
                line-height: 2;
            }

            >view:nth-child(4) {
                width: 100%;
                @include flexs(space-between, center);
                font-size: 22rpx;
                line-height: 2;
            }
        }
    }

    .shopContent {
        @include flexs(space-between, flex-start);
        padding: 20rpx 0;
        flex-wrap: wrap;

        .shopList {
            width: calc((100% - 20rpx) / 2);
            margin-bottom: 20rpx;

            .imgContent {
                // width: 44vw;
                // height: 44vw;

                padding-bottom: calc(30 / 38 * 100%);
                position: relative;
                // border-radius: 20rpx;
                overflow: hidden;

                .must {
                    position: absolute;
                    right: 10rpx;
                    top: 10rpx;
                    background-color: #fa690a;
                    color: #fff;
                    font-size: 20rpx;
                    border-radius: 5rpx;
                    padding: 0 10rpx;
                    line-height: 1.5;
                    font-weight: bold;
                }

                image {
                    // width: 100%;
                    // height: 100%;

                    position: absolute;
                    left: 0;
                    top: 0;
                    bottom: 0;
                    right: 0;
                    max-width: 100%;
                    max-height: 100%;
                    margin: auto;
                    width: auto;
                    height: auto;
                }
            }
        }

        .shopInfo {
            padding: 10rpx 0;

            .shopName {
                font-size: 28rpx;
                line-height: 1.5;
                // text-overflow: ellipsis;
                // overflow: hidden;
                // white-space: nowrap;
            }

            .shopDescribe {
                min-height: 48rpx;
                font-size: 24rpx;
                line-height: 2;
                color: rgba(0, 0, 0, 0.35);
                margin-bottom: 10rpx;
                text-overflow: ellipsis;
                overflow: hidden;
                white-space: nowrap;
            }

            .control {
                @include flexs(space-between, center);
                font-size: 24rpx;
                position: relative;

                .surplus {
                    color: rgba(0, 0, 0, 0.55);
                    @include flexs(flex-start, center);
                    flex-wrap: wrap;
                }

                .normal {
                    @include flexs(space-between, flex-start);
                    flex-direction: column;

                    span {
                        text-decoration: line-through;
                    }

                    .discount {
                        color: #666;
                    }
                }

                .price {
                    font-size: 32rpx;
                    color: #fa690a;
                    font-weight: bold;
                    margin-right: 10rpx;

                    text {
                        font-size: 24rpx;
                        font-weight: 400;
                    }
                }

                .specConetnt {
                    background: #fa690a;
                    border-radius: 4px;
                    padding: 5rpx 10rpx;
                    color: #fff;
                }

                .num {
                    width: 30rpx;
                    height: 30rpx;
                    font-size: 20rpx;
                    border-radius: 50%;
                    background-color: #f60000;
                    position: absolute;
                    right: -10rpx;
                    top: -10rpx;
                    line-height: 30rpx;
                    text-align: center;
                    color: #fff;
                }

                .showInput {
                    width: 50%;
                    @include flexs(center, center);
                    color: #00000080;
                    border-radius: 50rpx;
                    border: 1px solid #eee;

                    svg {
                        margin: 0 10rpx;
                    }

                    view {
                        width: 50rpx;
                        height: 50rpx;
                        text-align: center;
                        line-height: 25rpx;
                        font-size: 20px;
                    }
                }
            }
        }
    }

    .more {
        text-align: center;
        font-size: 24rpx;
        @include flexs(center, center);
        border-top: 1px solid #eee;
        line-height: 2;
        padding-top: 20rpx;

        image {
            transform: rotate(0);
            width: 25rpx;
            height: 25rpx;
            margin-left: 10rpx;
        }
    }
}

.shopCarBottom {
    z-index: 2;
    position: fixed;
    // left: 0;
    bottom: 100rpx;
    width: 100%;
    height: 116rpx;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 5px 0px 5px rgba(0, 0, 0, 0.05);
    @include flexs(space-between, center);
    padding: 18rpx 32rpx;

    image {
        width: 60rpx;
        height: 60rpx;
    }

    >view {
        &:nth-child(1) {
            >view {
                position: relative;

                >.num {
                    position: absolute;
                    right: -5px;
                    top: -5px;
                    font-size: 20rpx;
                    width: 30rpx;
                    height: 30rpx;
                    border-radius: 50%;
                    text-align: center;
                    line-height: 30rpx;
                    color: #fff;
                    background-color: red;
                }
            }

            >view:nth-child(2) {
                margin-left: 20rpx;
                font-weight: bold;
                font-size: 32rpx;
            }
        }

        @include flexs();

        &:nth-child(2) {
            background-color: #fa690a;
            color: #fff;
            border-radius: 30rpx;
            font-size: 28rpx;
            width: 206rpx;
            height: 80rpx;
            line-height: 80rpx;
            border-radius: 60rpx;
            text-align: center;
            display: block;
        }
    }

    >.dis {
        background-color: #bababa !important;
        color: #fff !important;
    }
}

.orderDet {
    // -webkit-overflow-scrolling: touch;

    /deep/.u-empty {
        min-height: 30vh;
    }

    >view:nth-child(1) {
        text-align: center;
        font-size: 32rpx;
        line-height: 2;
    }

    >view:nth-child(2) {
        text-align: center;
        font-size: 28rpx;
        line-height: 2;
    }

    .listContent {
        // max-height: 50vh;
        // min-height: 30vh;
        // overflow-y: scroll;
        // overflow-x: hidden;
        // -webkit-overflow-scrolling: touch;

        >.list {
            @include flexs();
            font-size: 22rpx;
            line-height: 74rpx;
            margin: 20rpx 0;
            padding: 10rpx 0;
            background-color: #f3f3f3;

            >view:nth-child(1) {
                text-align: center;
                width: 10%;
                margin: 0 1%;
            }

            >view:nth-child(2) {
                width: calc(22rpx * 6);
                text-overflow: ellipsis;
                overflow: hidden;
                white-space: nowrap;
            }

            >view:nth-child(3) {
                flex: 1;
                text-overflow: ellipsis;
                overflow: hidden;
                white-space: nowrap;
                margin: 0 1.5%;
            }

            >view:nth-child(4) {
                font-size: 22rpx;
                width: calc(22rpx * 7);
                text-overflow: ellipsis;
                overflow: hidden;
                white-space: nowrap;
            }
        }
    }
}

.posiContent {
    >view {
        &:nth-child(1) {
            font-size: 28rpx;
            color: rgba(0, 0, 0, 0.35);
            margin-bottom: 14rpx;
        }
    }

    >.listContent {
        margin-top: 10rpx;

        >view {
            .list {
                border-bottom: 1px solid rgba(0, 0, 0, 0.05);
                font-size: 28rpx;
                line-height: 40rpx;
                padding: 24rpx 0;
            }

            &:last-child {
                border-bottom: 0;

                .list {
                    border: 0;
                }
            }
        }
    }
}

.specBox {
    /deep/.u-mode-center-box {
        min-height: auto;
    }

    .specContent {
        min-height: 20vh;
        position: relative;

        >view:nth-child(1) {
            font-size: 36rpx;
            line-height: 1;
            font-weight: bold;
            margin-bottom: 32rpx;
        }

        >.specList {
            margin-bottom: 20rpx;

            >view {
                @include flexs();
                flex-wrap: wrap;
                font-size: 24rpx;
                line-height: 1.5;

                &:nth-child(1) {
                    font-size: 28rpx;
                    margin-bottom: 20rpx;
                }

                &:nth-child(2) {
                    >view {
                        margin-bottom: 10rpx;
                        @include flexs();
                        margin-right: 10rpx;
                        border-radius: 10rpx;
                        overflow: hidden;
                        border: 0.5px solid rgba(0, 0, 0, 0.1);
                        line-height: 2;

                        >view {
                            padding: 0 10rpx;

                            &:nth-child(2) {
                                border-left: 1px solid rgba(0, 0, 0, 0.1);
                                color: #f50000;
                                background-color: #f5f5f5;
                            }

                            &:nth-child(1) {
                                background-color: #f5f5f5;
                            }
                        }
                    }

                    >.specCheckList {
                        border: 1px solid #fa690a;

                        >view {
                            &:nth-child(1) {
                                color: #fa690a;
                                background-color: #fff8f0;
                            }

                            &:nth-child(2) {
                                border-left: 1px solid #fa690a;
                                background-color: #fff8f0;
                            }
                        }
                    }
                }
            }
        }
    }

    .specControl {
        @include flexs(space-between, center);
        margin-top: 50rpx;

        >view:nth-child(1) {
            font-size: 24rpx;

            text {
                font-size: 36rpx;
                font-weight: bold;
                color: #f50000;
                margin-left: 10rpx;
            }
        }

        >view:nth-child(2) {
            color: #fff;
            font-size: 28rpx;
            width: 346rpx;
            height: 88rpx;
            line-height: 88rpx;
            border-radius: 60rpx;
            background-color: #fa690a;
            display: block;
            text-align: center;
        }
    }
}

.shopCarBox {
    width: 100%;
    background-color: #fff;
    position: fixed;
    z-index: 2;
    bottom: 216rpx;
    // left: 0;
    border-bottom: 1px solid #eee;
    border-top-left-radius: 20rpx;
    border-top-right-radius: 20rpx;
    overflow: hidden;

    // box-shadow: 0 -5px 5px #eee;
    .u-empty {
        min-height: 25vh;
    }

    .shopCarContent {
        padding: 20rpx;
        max-height: 40vh;
        overflow-y: auto;

        >view:nth-child(1) {
            @include flexs(space-between, center);
            font-size: 28rpx;
            line-height: 2;
            color: rgba(0, 0, 0, 0.35);

            label,
            view {
                @include flexs(flex-end, center);
            }

            image {
                width: 40rpx;
                height: 40rpx;
                margin-right: 16rpx;
            }
        }

        .shopList {
            >view:nth-child(1) {
                margin: 20rpx 0;
                @include flexs();
                border-bottom: 1px solid #eee;
                padding: 32rpx 0;

                image {
                    width: 100rpx;
                    height: 100rpx;
                    margin-right: 24rpx;
                    border-radius: 16rpx;
                    flex-shrink: 0;
                }

                >view {
                    height: 100rpx;
                    @include flexs(space-between, flex-start);
                    flex-direction: column;
                    padding: 5rpx 0;

                    >view {
                        &:nth-child(1) {
                            font-size: 28rpx;
                            font-weight: bold;
                        }

                        &:nth-child(2) {
                            font-size: 24rpx;
                            color: rgba(0, 0, 0, 0.55);
                            display: -webkit-box;
                            -webkit-line-clamp: 2;
                            -webkit-box-orient: vertical;
                            overflow: hidden;
                        }
                    }
                }
            }

            .foodList {
                @include flexs();
                margin: 40rpx 0;

                >view {
                    width: 100%;
                    @include flexs();

                    image {
                        width: 108rpx;
                        height: 108rpx;
                        margin-right: 20rpx;
                        flex-shrink: 0;
                        object-fit: cover;
                        border-radius: 16rpx;
                    }

                    >view {
                        flex: 1;
                        height: 108rpx;
                        @include flexs(space-between, flex-start);
                        flex-direction: column;

                        >view {
                            @include flexs(space-between, center);
                            width: 100%;

                            &:nth-child(1) {
                                font-size: 28rpx;
                                font-weight: bold;
                            }

                            &:nth-child(2) {
                                font-size: 12px;
                                color: #000;
                                font-weight: bold;
                            }

                            >view {
                                @include flexs();

                                &:nth-child(2) {
                                    border-radius: 50rpx;
                                    border: 1px solid #eee;
                                }

                                &:nth-child(1) {
                                    font-size: 28rpx;
                                    // font-weight: bold;
                                }

                                svg {
                                    margin: 0 10rpx;
                                }

                                >view {
                                    width: 50rpx;
                                    height: 50rpx;
                                    font-size: 36rpx;
                                    text-align: center;
                                    line-height: 50rpx;
                                    font-weight: 400;
                                }

                                /deep/.u-input__input {
                                    flex: 1;
                                    line-height: 50rpx;
                                    height: 50rpx;
                                    font-size: 28rpx;
                                    min-height: 50rpx !important;
                                    text-align: center;
                                }
                            }
                        }
                    }
                }
            }
        }
    }

    /deep/.uni-checkbox-input {
        border-radius: 50%;
        width: 40rpx;
        height: 40rpx;
    }

    /deep/.uni-checkbox-input-checked {
        border-color: #f1b825 !important;

        &:before {
            content: '';
            width: 35rpx;
            height: 35rpx;
            background-color: #f1b825;
            border-radius: 50%;
            display: block;
        }
    }
}

.blackBox {
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    position: fixed;
    left: 0;
    top: 0;
    display: none;
}

.show {
    display: block;
}

.storeDet {
    >view {
        font-size: 28rpx;
        line-height: 2;
        font-weight: bold;
        text-align: center;
        margin-bottom: 20rpx;
    }
}

/* 定义动画 */
@-webkit-keyframes show {
    0% {
        transform: rotateX(180deg);
        opacity: 0;
    }

    50% {
        transform: rotateX(25deg);
        opacity: 1;
    }

    60% {
        transform: rotateX(-25deg);
        opacity: 1;
    }

    70% {
        transform: rotateX(25deg);
        opacity: 1;
    }

    80% {
        transform: rotateX(-6deg);
        opacity: 1;
    }

    90% {
        transform: rotateX(6deg);
        opacity: 1;
    }

    100% {
        transform: rotateX(0);
        opacity: 1;
    }
}

/* 定义一个回去的动画 */
@-webkit-keyframes hide {
    0% {
        transform: rotateX(0);
        opacity: 1;
    }

    100% {
        transform: rotateX(180deg);
        opacity: 0;
    }
}

.warnBox {
    width: 100%;
    height: 100vh;
    @include flexs(center, center);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 99999999;
    transition: all 0.2s;
    display: none;

    >view {
        width: 80%;
        height: 100rpx;
        background-color: rgba(0, 0, 0, 0.7);
        border-radius: 20rpx;
        color: #fff;
        @include flexs(center, center);
    }
}

.warnBoxShow {
    display: flex;
}
</style>
<!-- @media -->
<!-- <style lang="scss">
  // 屏幕宽 [600px, 768px) 手机
  @media only screen and (min-width: 600px) and (max-width: 768px) {
    
  }
  // 屏幕宽 [768px, 992px) 平板
  @media only screen and (min-width: 768px) and (max-width: 992px) {
    .hotelBox .hotellList .shopContent .shopList {
          width: calc((100% - 60rpx) / 4);
    }
  }
  // 屏幕宽 [992px, 1200px) 笔记本
  @media only screen and (min-width: 992px) and (max-width: 1200px) {
    .hotelBox .hotellList .shopContent .shopList {
          width: calc((100% - 100rpx) / 6);
    }
  }
  // 屏幕宽 [1200px, ∞) 大屏桌面
  @media only screen and (min-width: 1200px) {
    .hotelBox .hotellList .shopContent .shopList {
          width: calc((100% - 100rpx) / 8);
    }
  } 
  </style> -->
<style lang="scss">
swiper {
    height: 400rpx !important;
    padding: 0 !important;
    margin: 0 !important;
}

.searchBox {
    .u-input {
        flex: 1;
        text-indent: 20rpx;
        color: rgba(0, 0, 0, 0.35);
        line-height: 2;
        font-size: 28rpx !important;
    }
}

.showInput {
    /deep/.u-input__input {
        flex: 1;
        line-height: 50rpx;
        height: 50rpx;
        font-size: 28rpx;
        min-height: 50rpx !important;
        text-align: center;
    }
}

.indexBig {
    /deep/.u-mode-center-box {
        width: 90% !important;
        max-height: 80vh;
        padding: 40rpx 20rpx;
        border-radius: 20rpx;
        min-height: 30vh;
    }

    .alertBox {
        width: 100%;

        .title {
            font-size: 30rpx;
            text-align: center;
            font-weight: bold;
            line-height: 2;
            text-algin: center;
        }

        .content {
            width: 90%;
            text-align: center;
            margin: 40rpx auto;
        }
    }
}

.posiBottom {
    .posiContent {
        padding-bottom: 60rpx;
    }

    /deep/.u-drawer-bottom {
        width: 100% !important;
        padding: 36rpx 20rpx 40rpx 20rpx;
        border-top-left-radius: 40rpx;
        border-top-right-radius: 40rpx;
        min-height: 30vh;
        max-height: 80vh;
        overflow: auto;
    }

    /deep/ {
        .u-drawer__scroll-view {
            max-height: 80vh;
        }
    }
}

.storeDet {
    /deep/.u-drawer-top {
        max-height: 80vh !important;
        overflow-y: scroll;
        padding: 0 20rpx 0 20rpx;
        // border-top-left-radius: 40rpx;
        // border-top-right-radius: 40rpx;
        // min-height: 30vh;
    }
}

.orderContent {
    /deep/.u-drawer__scroll-view {
        max-height: 50vh;
    }
}

.storeDet {
    /deep/.u-drawer-bottom {
        width: 100% !important;
        padding: 36rpx 20rpx 40rpx 20rpx;
        border-top-left-radius: 40rpx;
        border-top-right-radius: 40rpx;
        min-height: 30vh;
        overflow: auto;
    }

    /deep/ {
        .u-drawer__scroll-view {
            max-height: 80vh;
        }
    }
}

.imgContent {
    /deep/.u-wrap {
        image {
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            right: 0;
            max-width: 100%;
            max-height: 100%;
            margin: auto;
            width: auto !important;
            height: auto !important;
        }
    }
}

.btn-v-console {
    width: 40px;
    height: 40px;
    // background: red;
    position: fixed;
    bottom: 0px;
    left: 0px;
    z-index: 3;
}
</style>